package com.share.example.selenium.model.amazon.seller;

import com.share.example.selenium.utils.UsDateUtil;
import lombok.Data;

import java.util.Date;

@Data
public class PromoteTask {
    //    private Goods goods;
    private String asin;
    private Integer benefit;
    private Date startDateTime;
    private String startDate;
    private String startTime;
    private String endDate;
    private String promotionSuffix;
    private String promotionName;

    //禁止使用
//    private PromotionTaskVo() {
//
//    }

    public PromoteTask(Integer benefit, Date startDateTime, String promotionSuffix) {
        this.benefit = benefit;
        this.promotionSuffix = promotionSuffix;

        this.startDateTime = startDateTime;

        //开始时间
        this.startDate = UsDateUtil.toYYYY_MM_DD(startDateTime);
        this.startTime = UsDateUtil.toHH_MM_SS(startDateTime);

        //计算结束日期
        this.endDate = UsDateUtil.toYYYY_MM_DD(UsDateUtil.addHourToDate(startDateTime, 28 * 24));
    }
}
